// Copyright 2023 Huawei Cloud Computing Technology Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef _VIDEO_ENCODER_PARAM_H_
#define _VIDEO_ENCODER_PARAM_H_
#include <unistd.h>

struct VideoEncoderParam {
    uint32_t frameRate = 30;        // 帧率0~60
    uint32_t repeatFPS = 30;        // 补帧帧率
    uint32_t bitrate = 3000000;     // 1M~10M
    uint32_t gopSize = 60;          // I帧间隔30~5000
    uint32_t profile = 66;          // 66,77,100
    uint8_t rcMode = 0;             // 0 ABR 1 CRF 2 CBR 3 CAPPED-CRF
    uint8_t keyFrame = 0;           // 0 false 1 true
    uint32_t width = 720;           // 32对齐
    uint32_t height = 1280;         // 4对齐
    uint8_t cpuCnt = 2;             // slice线程数，1~6，default: 2
    bool sliceBased = 1;            // 0 frame based, 1 slice based
    bool disrepeat = 0;             // 0 repeat open, 1 repeat close
    EncodeFrameType frameType = FRAME_TYPE_H264;    
    EncodeType encoderType = ENCODER_TYPE_DEFAULT;
    std::string preset = "veryfast";   
    std::string tune = "zerolatency";
};
#endif  // _VIDEO_ENCODER_PARAM_H_